<template>
  <div class="common-layout">
    <el-container
      class="layout-container"
      :class="{ collapse: !appStore.sideOpenFlag }"
    >
      <el-aside class="layout-sidebar">
        <!-- logo -->
        <Logo />
        <!-- 侧栏 -->
        <SideMenu />
      </el-aside>
      <el-container>
        <!-- 顶栏 -->
        <el-header class="layout-tabbar">
          <HeaderBar />
        </el-header>
        <!-- 主内容区 -->
        <el-main class="layout-main">
          <Main />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup lang="ts">
import Logo from './components/Logo.vue'
import SideMenu from './components/SideMenu/index.vue'
import HeaderBar from './components/HeaderBar/index.vue'
import useAppStore from '@/store/modules/app'
import Main from './components/Main.vue'

const appStore = useAppStore()
</script>

<style lang="scss" scoped></style>
